This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com.
When you click the Knit button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:
Graph_Attributes<-data.table::fread(here::here("data", "CGCS-GraphData-NodeTypes.csv"))
s1 <- data.table::fread(here::here("dataQ2","dfSeed1Reduced.csv"))
s3 <- data.table::fread(here::here("dataQ2","dfSeed3Reduced.csv"))
s1_network <- subset(s1, select = c(Source, Target, Weight))
s3_network <- subset(s3, select = c(Source, Target, Weight))
s1_edgelist <- s1_network
s1_graph <- graph.data.frame(s1_edgelist, directed = TRUE)
s3_edgelist <- s3_network
s3_graph <- graph.data.frame(s3_edgelist, directed = TRUE)
s1_graph2<-igraph::simplify(s1_graph, remove.multiple = FALSE, remove.loops = TRUE)
s3_graph2<-igraph::simplify(s3_graph, remove.multiple = FALSE, remove.loops = TRUE)
tail(s1, 10)
## V1 Source eType Target Time Weight SourceLocation
## 1: 2551 481408 6 561157 17712000 4 3
## 2: 834 626174 6 561157 23155200 1 3
## 3: 2675 462691 6 561157 24019200 6 3
## 4: 2548 481408 6 509607 11836800 4 3
## 5: 147 552243 6 509607 20995200 0 3
## 6: 2596 594696 6 509607 31363200 5 3
## 7: 3011 564784 2 547205 22653139 4 NA
## 8: 5053 583737 3 547205 22653139 4 NA
## 9: 3010 564784 2 547205 19623898 80 NA
## 10: 4940 583737 3 547205 19623898 80 NA
unique(Graph_Attributes$NodeType)
## [1] 1 4 3 2 5
s1_edgelist <- s1_edgelist[!duplicated(s1_edgelist)]
## + 83/83 vertices, named, from b1873d7:
## [1] 600971 564804 626174 470784 554368 638591 477333 533691 558444 490882
## [11] 594696 462691 631159 605385 506539 564784 466429 532462 583737 631490
## [21] 510031 552988 575811 547483 474123 481408 620120 493846 469603 542731
## [31] 573191 537659 527214 603212 521273 597450 591024 643930 479674 495487
## [41] 573678 589043 584511 552243 501914 536173 630700 529018 571938 579269
## [51] 536346 520660 567195 527449 459381 595298 466907 589943 577992 537281
## [61] 523927 580426 642329 503701 644226 632961 473173 630626 616315 575030
## [71] 621924 503218 571970 640784 595581 606730 499467 616453 625756 657173
## [81] 561157 509607 547205
## [1] 793